<?php

namespace app\index\model;

use think\Model;
use think\Db;

class LoginModel extends Model {
    // 设置当前模型对应的完整数据表名称
//    protected $table = 'think_user';

    /**
     *  登陆验证
     * @param type $user
     * @param type $pwd
     * @return typed
     */
    function check_user($user, $pwd) {
        $where['user'] = $user;
        $where['pwd'] = md5(sha1($pwd) . 'lajitp5');
        return Db::table('chat_user')->where($where)->find();
    }

    function functionName() {
        
    }

}
